﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<IEnumerable<Lecturer>>" %>
<%@ Import Namespace="ViewRes" %>
<script type="text/javascript">

    $(function() {
        loadActiveEntries();
    });

    function editLecturer(link) {
        openDialog(link, '<%:AdministratorsStrings.EditLecturer%>', function() {
            $("#divAccordion").accordion({ header: "h3" });
            $("#divDialog form").attr("onSuccess", "loadActiveEntries();");
        });
    }

    function loadActiveEntries() {
        $("#divLecturersList").load('<%:Url.RouteUrl("Default", new {controller = "Lecturers", action = "GetAll"})%>');
    }

</script>
<%
    if (Model.Count() == 0)
    {%>
<span class='mediumBoldText'><%:AdministratorsStrings.NoLecturers%></span>
<%
    } %>
<%
    else
    {%>
    <div id="divLecturersList">
    
    </div>
<%
    }%>